#include <iostream>

using namespace std;

template <typename T>
T factorial(T n)
{
    if (n < 2)
        return 1;
    else
        return n * factorial(n - 1);
}

int main()
{
    int n;
    cin >> n;
    cout << "Input m:" << n << "! = " << factorial(n)
            << endl;
    return 0;
}